package cn.westv.scps.service.ownerfeedback.impl;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import cn.westv.scps.dao.BaseDao;
import cn.westv.scps.domain.OwnerFeedbackEntity;
import cn.westv.scps.service.ownerfeedback.IOwnerFeedbackService;
import cn.westv.scps.utils.Page;
/**
 * 用户反馈实现类
 * @author Administrator
 *
 */
@Service
@Transactional
public class OwnerFeedbackServiceImpl implements IOwnerFeedbackService{

	@Autowired
	@Qualifier("baseDao")
	private BaseDao dao;
	
	@Override
	@Transactional(propagation = Propagation.NOT_SUPPORTED)
	public List<OwnerFeedbackEntity> find(String hql, Class<OwnerFeedbackEntity> entityClass, Object[] params) {
		return dao.find(hql, entityClass, params);
	}

	@Override
	@Transactional(propagation = Propagation.NOT_SUPPORTED)
	public OwnerFeedbackEntity get(Class<OwnerFeedbackEntity> entityClass, Serializable id) {
		return dao.get(entityClass, id);
	}

	@Override
	@Transactional(propagation = Propagation.NOT_SUPPORTED)
	public Page<OwnerFeedbackEntity> findPage(String hql, Page<OwnerFeedbackEntity> page,
			Class<OwnerFeedbackEntity> entityClass, Object[] params) {
		return dao.findPage(hql, page, entityClass, params);
	}

	@Override
	@Transactional(propagation = Propagation.NOT_SUPPORTED)
	public Page<OwnerFeedbackEntity> findPageBySql(String sql, Page<OwnerFeedbackEntity> page,
			Class<OwnerFeedbackEntity> entityClass, Object[] params) {
		return dao.findPageBySql(sql, page, entityClass, params);
	}

	@Override
	@Transactional(readOnly = false, isolation = Isolation.DEFAULT, propagation = Propagation.REQUIRED)
	public void saveOrUpdate(OwnerFeedbackEntity entity) {
		dao.saveOrUpdate(entity);
	}

	@Override
	@Transactional(readOnly = false, isolation = Isolation.DEFAULT, propagation = Propagation.REQUIRED)
	public void save(OwnerFeedbackEntity entity) {
		dao.save(entity);
	}

	@Override
	@Transactional(readOnly = false, isolation = Isolation.DEFAULT, propagation = Propagation.REQUIRED)
	public void update(OwnerFeedbackEntity entity) {
		dao.update(entity);
	}

	@Override
	@Transactional(readOnly = false, isolation = Isolation.DEFAULT, propagation = Propagation.REQUIRED)
	public void saveOrUpdateAll(Collection<OwnerFeedbackEntity> entitys) {
		dao.saveOrUpdateAll(entitys);
	}

	@Override
	@Transactional(readOnly = false, isolation = Isolation.DEFAULT, propagation = Propagation.REQUIRED)
	public void deleteById(Class<OwnerFeedbackEntity> entityClass, Serializable id) {
		dao.deleteById(entityClass, id);
	}

	@Override
	@Transactional(readOnly = false, isolation = Isolation.DEFAULT, propagation = Propagation.REQUIRED)
	public void delete(Class<OwnerFeedbackEntity> entityClass, Serializable[] ids) {
		dao.delete(entityClass, ids);
	}

	@Override
	@Transactional(propagation = Propagation.NOT_SUPPORTED)
	public List<OwnerFeedbackEntity> querySQL(String SQL, Object[] params, Class<OwnerFeedbackEntity> entityClass) {
		return dao.querySQL(SQL, params, entityClass);
	}

	@Override
	@Transactional(propagation = Propagation.NOT_SUPPORTED)
	public OwnerFeedbackEntity queryHQL(String HQL, Object[] params, Class<OwnerFeedbackEntity> entityClass) {
		return dao.queryHQL(HQL, params, entityClass);
	}

}
